package enums;

/**
 * 手动实现枚举
 * Created by butterfly on 2018/5/23.
 */
public class Season {
    private final String name;
    private final String desc;
    //有限属性
    public static final Season SPRING = new Season("SPRING","春天");
    public static final Season SUMMER = new Season("SUMMER","夏天");
    public static final Season FALL = new Season("FALL","秋天");
    public static final Season WINTER = new Season("WINTER","冬天");



    //不允许外部构造,只允许内部调用静态属性构造
    private Season(String name, String desc) {
        this.name = name;
        this.desc = desc;
    }

    public String getName() {
        return name;
    }

    public String getDesc() {
        return desc;
    }
}
